<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core" >
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets">
	
	<div id="textbox">
		<h:panelGroup rendered="#{not(view.viewId eq '/loggedIn/menu.xhtml')}">
			<h:panelGroup rendered="#{request.isUserInRole('Admin')}">
				<h:outputLink value="../admin/editUser.xhtml" style="float: left" >#{msg['create.user']}</h:outputLink>
				<h:outputLink value="../admin/viewUserList.xhtml" style="float: left; padding-left: 16px" >#{msg['view.user.list']}</h:outputLink>
			</h:panelGroup>
			<h:panelGroup rendered="#{request.isUserInRole('Admin') and request.isUserInRole('Receptionist')}">
				<h:outputLink value="../rec/findClient.xhtml" style="float: left; padding-left: 16px" >#{msg['find.client']}</h:outputLink>
			</h:panelGroup>
	 		<h:panelGroup rendered="#{(request.isUserInRole('Doctor') or request.isUserInRole('Receptionist')) and not request.isUserInRole('Admin')}">
	 			<h:outputLink value="../rec/findClient.xhtml" style="float: left" >#{msg['find.client']}</h:outputLink>
	 		</h:panelGroup>
	 		<h:panelGroup rendered="#{request.isUserInRole('Doctor') and not request.isUserInRole('Receptionist')}">			
				<h:outputLink value="../doc/viewTreatmentRequestList.xhtml" style="float: left; padding-left: 16px" >#{msg['treatment.requests']}</h:outputLink>
			</h:panelGroup>
			<h:panelGroup rendered="#{request.isUserInRole('Doctor')}">						
				<h:outputLink value="../doc/editDoctorProfile.xhtml" style="float: left; padding-left: 16px" >#{msg['edit.profile']}</h:outputLink>
			</h:panelGroup>
	 		<h:panelGroup rendered="#{request.isUserInRole('Receptionist')}">
				<h:outputLink value="../rec/viewTreatmentRequestList.xhtml" style="float: left; padding-left: 16px" >#{msg['treatment.requests']}</h:outputLink>
				<h:outputLink value="../rec/createClientProfile.xhtml" style="float: left; padding-left: 16px" >#{msg['create.client.card']}</h:outputLink>
				<h:outputLink value="../rec/findDoctor.xhtml" style="float: left; padding-left: 16px" >#{msg['doctor.list']}</h:outputLink>									
			</h:panelGroup>
 		</h:panelGroup>
  		<h:form>
  			<h:commandLink action="#{loginBean.logout}" style="float: right; padding-left: 10px">#{msg['logout']}</h:commandLink>
  		</h:form>
  		<h:panelGroup rendered="#{request.isUserInRole('Receptionist') and request.isUserInRole('Doctor') and request.isUserInRole('Admin')}" layout="block"><br /></h:panelGroup>  		
  		<h:outputText style="float: right; font-family: Verdana;" value="#{msg['hello']}, #{request.getUserPrincipal().getName()}!"/>
	</div>
	<div style="clear: both;"></div>
	<hr />

</ui:composition>
</html>